package org.springblade.modules.system.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "mes")
public class MesConfig {

	public static String UPLOAD_TYPE_RESOURCE = "resource";

	public static String UPLOAD_TYPE_FILE = "file";
	//资源目录
	private String resourcePath = "C:/upload/resource/";
	//文件目录
	private String filePath = "C:/upload/file/";

	public String getUploadPath(String uploadType) {
		if (UPLOAD_TYPE_RESOURCE.equals(uploadType)) {
			return resourcePath;
		}
		return filePath;
	}
}
